var theselectedimage='';
var imagepfad='images/album/';
var win;

Ext.ux.IFrameComponent = Ext.extend(Ext.BoxComponent, {
     onRender : function(ct, position){
          this.el = ct.createChild({tag: 'iframe', id: 'iframe-'+ this.id, frameBorder: 0, src: this.url});
     }
});

function editfile(){
  var ismaximized=false;
  var winheight=500;
  var winy=20;
  if(win)
    win = '';
  win = new Ext.Window({
      title: 'AIE (Ajax Image Editor) - Demo',
      shadow:true,
	  modal:true,
      layout:'fit',
      width:800,
      height:winheight,
      y:winy,
      maximizable: true,
      maximized: ismaximized,
      items: [new Ext.ux.IFrameComponent({ id: 'aieiframe', url: 'aie/imageeditor.php?img=' + encodeURIComponent(imagepfad+theselectedimage.id) })]
  });
  win.show(theselectedimage);
} 